package com.ecfront.pojo;

import java.util.Date;
import java.util.Set;

/**
 * 出售的商品
 * 
 * @version 1.0
 * @author zhufeng
 */
public class GoodsImpl {

	private int id;// 出售商品ID
	private double price;// 出售商品价格
	private int isRecommend;// 是否设置为推荐
	private int hits;// 商品点击数
	private String info;// 商品修改介绍
	private Date date;// 商品上架时间
	// 以下是多对一关联
	private ShopGoodsSort sgs;// 商品所属的类别
	private Shop shop;// 商品所属店铺
	private Goods good;// 商品所继承的仓库
	// 以下是一对多关联
	private Set goodsComplains;// 该商品被投诉的集合
	private Set payGoods;// 该商品的销售记录
	private Set messages;// 该商品的留言记录

	public GoodsImpl() {}
	public GoodsImpl(int id, ShopGoodsSort sgs, Goods good, Shop shop) {
		this.id = id;
		this.sgs = sgs;
		this.good = good;
		this.shop = shop;
	}
	public GoodsImpl(int id, ShopGoodsSort sgs, Goods good, Shop shop,
			Double price, int isRecommend, int hits, String info,
			Date date, Set payGoods, Set messages, Set goodsComplains) {
		this.id = id;
		this.sgs = sgs;
		this.good = good;
		this.shop = shop;
		this.price = price;
		this.isRecommend = isRecommend;
		this.hits = hits;
		this.info = info;
		this.date = date;
		this.payGoods = payGoods;
		this.messages = messages;
		this.goodsComplains = goodsComplains;
	}

	public Set getMessages() {
		return messages;
	}

	public void setMessages(Set messages) {
		this.messages = messages;
	}

	public Set getPayGoods() {
		return payGoods;
	}

	public void setPayGoods(Set payGoods) {
		this.payGoods = payGoods;
	}

	public Set getGoodsComplains() {
		return goodsComplains;
	}

	public void setGoodsComplains(Set goodsComplains) {
		this.goodsComplains = goodsComplains;
	}

	public ShopGoodsSort getSgs() {
		return sgs;
	}

	public void setSgs(ShopGoodsSort sgs) {
		this.sgs = sgs;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public int getIsRecommend() {
		return isRecommend;
	}

	public void setIsRecommend(int isRecommend) {
		this.isRecommend = isRecommend;
	}

	public int getHits() {
		return hits;
	}

	public void setHits(int hits) {
		this.hits = hits;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public Shop getShop() {
		return shop;
	}

	public void setShop(Shop shop) {
		this.shop = shop;
	}

	public Goods getGood() {
		return good;
	}

	public void setGood(Goods good) {
		this.good = good;
	}
}
